package cn.edu.ctbu.lddweb.service.lmpl;

import cn.edu.ctbu.lddweb.mapper.VacationMapper;
import cn.edu.ctbu.lddweb.pojo.Vacation;
import cn.edu.ctbu.lddweb.service.VacationService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 请假管理实现层
 */
@Service
public class VacationServicelmpl implements VacationService {

    @Autowired
    private VacationMapper vacationMapper;

    @Override
    public List<Vacation> selectList(Vacation vacation) {
        return vacationMapper.selectList(vacation);
    }

    @Override
    public Vacation findID(@Param("id") int id) {
        return vacationMapper.findID(id);
    }

    @Override
    public int insertVacation(Vacation vacation) {
        return vacationMapper.insertVacation(vacation);
    }

    @Override
    public int updateVacation(Vacation vacation) {
        return vacationMapper.updateVacation(vacation);
    }

    @Override
    public int deleteVacation(String id) {
        return vacationMapper.deleteVacation(id);
    }

    @Override
    public List<Vacation> selectStudentName(Vacation vacation) {
        return vacationMapper.selectStudentName(vacation);
    }

    @Override
    public int updateVacationbyTeacher(Vacation vacation) {
        return vacationMapper.updateVacationbyTeacher(vacation);
    }
}
